home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Safarir 3
/
SafTV-CD3.iso
/
pc
/
Bonus
/
Dessins Animés
/
static
/
jeux
/
napman.swf
/
scripts
/
frame_328
/
DoAction.as
Wrap
Text File
|
2001-11-21
|
2KB
|
104 lines
if(mangiato4 == "0")
{
px4 = int(f4x / "4");
py4 = int(f4y / "4");
restox = f4x - px4 * "4";
restoy = f4y - py4 * "4";
if(restox == "0" and restoy == "0")
{
x = f4x;
y = f4y;
call("evaluate");
xv = f4vx;
yv = f4vy;
call("controlla");
if(ok == "1")
{
f4vx = xvs;
f4vy = yvs;
call("ruotafan");
}
}
setProperty("/f4", _X, f4x * "4" + "8");
setProperty("/f4", _Y, f4y * "4" + "8");
if(f4vx == "1")
{
pros = "3";
}
else
{
pros = "0";
}
if(f4vy == "1")
{
prosy = "3";
}
else
{
prosy = "0";
}
tpx = f4x + f4vx + pros;
tpy = f4y + f4vy + prosy;
cosa = eval("r" add int(tpy / "4")).substr(int(tpx / "4") + "1","1");
if(cosa ne "X" and cosa ne "T" and cosa ne "R")
{
f4x += f4vx;
f4y += f4vy;
}
else
{
x = f4x;
y = f4y;
call("evaluate");
f4vx = xvs;
f4vy = yvs;
call("ruotafan");
}
if((px - f4x) * (px - f4x) < "10" and (py - f4y) * (py - f4y) < "10")
{
if(status == "1")
{
score += "100";
mangiato4 = "1";
tellTarget("/f4")
{
gotoAndStop(9);
}
tellTarget("/suoni")
{
gotoAndStop("magna");
play();
}
}
else
{
gameover = "1";
}
}
}
else
{
if(f4y < "56")
{
f4y += "1";
}
if("56" < f4y)
{
f4y -= "1";
}
if("56" < f4x)
{
f4x -= "1";
}
if(f4x < "56")
{
f4x += "1";
}
setProperty("/f4", _X, f4x * "4" + "8");
setProperty("/f4", _Y, f4y * "4" + "8");
if(f4y == "56" and f4x == "56")
{
mangiato4 = "0";
}
}